<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN">
<html>
<head>
<title>TCustomSqlStatement.TableTokens Property</title>
    <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
    <meta name="generator" content="Doc-O-Matic" />
    <meta http-equiv="Content-Style-Type" content="text/css" />
    <link rel="STYLESHEET" href="default.css" type="text/css" />

<script type="text/javascript" src="scripts.js"></script>
</head>
<body class="Element700" onload="onBodyLoadEx('frames.html', 'topic', 'TCustomSqlStatement_TableTokens.html');" onmousedown="onBodyMouseDown();">

<!-- Begin Popups -->

<!-- End Popups -->

<!-- Begin Page Header -->
<div class="Element710" id="areafixed">
<div class="Element94">
<em>You are here:</em> Symbol Reference &gt; <a href="!!CLASSES.html" target="topic">Classes</a> &gt; <a href="Common_SQL_Statement_Classes.html" target="topic">Common SQL Statement Classes</a> &gt; <a href="TCustomSqlStatement.html" target="topic">TCustomSqlStatement Class</a> &gt; <a href="!!MEMBERVISIBLITY_public_TCustomSqlStatement.html" target="topic">public</a> &gt; <a href="TCustomSqlStatement_TableTokens.html" target="topic">TableTokens Property</a></div>
<div class="Element92">
<table width="100%" cellspacing="0" cellpadding="0">
<tr><td width="50%">
<div class="Element2">
<a href="contents.html" target="tocidx"><img src="btn_globals_contents_midblue.gif" border="0" alt="Contents" title="Contents" onmouseover="switchImage(this, 'btn_globals_contents_midblue_hover.gif');" onmouseout="switchImage(this, 'btn_globals_contents_midblue.gif');"></a><a href="idx.html" target="tocidx"><img src="btn_globals_index_midblue.gif" border="0" alt="Index" title="Index" onmouseover="switchImage(this, 'btn_globals_index_midblue_hover.gif');" onmouseout="switchImage(this, 'btn_globals_index_midblue.gif');"></a><a href="index.html" target="topic"><img src="btn_globals_home_midblue.gif" border="0" alt="Home" title="Home" onmouseover="switchImage(this, 'btn_globals_home_midblue_hover.gif');" onmouseout="switchImage(this, 'btn_globals_home_midblue.gif');"></a></div>
</td><td width="50%">
<div class="Element90">
<a href="TCustomSqlStatement_Tables.html" target="topic"><img src="btn_prev_midblue.gif" border="0" alt="Previous" title="Previous" onmouseover="switchImage(this, 'btn_prev_midblue_hover.gif');" onmouseout="switchImage(this, 'btn_prev_midblue.gif');"></a><a href="!!MEMBERVISIBLITY_public_TCustomSqlStatement.html" target="topic"><img src="btn_up_midblue.gif" border="0" alt="Up" title="Up" onmouseover="switchImage(this, 'btn_up_midblue_hover.gif');" onmouseout="switchImage(this, 'btn_up_midblue.gif');"></a><a href="TCustomSqlStatement_TriggerTokens.html" target="topic"><img src="btn_next_midblue.gif" border="0" alt="Next" title="Next" onmouseover="switchImage(this, 'btn_next_midblue_hover.gif');" onmouseout="switchImage(this, 'btn_next_midblue.gif');"></a></div>
</td></tr></table><div class="Element5">
TCustomSqlStatement.TableTokens Property</div>
</div>
</div>

<!-- End Page Header -->

<!-- Begin Client Area -->
<div class="Element720" id="areascroll">
<div class="Element721">

<!-- Begin Page Content -->
<div class="Element58">
<a name="Pascal"></a><div class="Element99">
Pascal</div>
<div class="Element101"><div class="Element100"><pre class="Element100"><strong>property</strong> TableTokens: <a href="TSourceTokenList.html" target="topic">TSourceTokenList</a>;</pre></div></div>
<a name="Description"></a><div class="Element14">
Description</div>
<div class="Element11">
<div class="Element10">
<p class="Element10">
 &nbsp;</p>
<p class="Element10">
<a href="TCustomSqlStatement_Table.html" target="topic">Table</a> tokens in this sql.&nbsp;</p>
<p class="Element10">
&nbsp;</p>
<p class="Element10">
Before go further details about this property, let's take a look at this sql,&nbsp;</p>
<p class="Element10">
&nbsp;</p><div class="Element13"><div class="Element12"><pre class="Element12">select table1.f1, t1.f2
from table1 t1
where t1.f3 = 1</pre></div></div>
<p class="Element10">
&nbsp;</p>
<p class="Element10">
Token 'table1' in from clause is a <strong>declared table token</strong>.&nbsp;</p>
<p class="Element10">
Token 'table1' in select list is a <strong>referenced table token</strong>.&nbsp;</p>
<p class="Element10">
Token 't1' in from clause is a <strong>declared table alias token</strong>.&nbsp;</p>
<p class="Element10">
Token 't1' in select list and where clause is a <strong>referenced table alias</strong>.&nbsp;</p>
<p class="Element10">
&nbsp;</p>
<p class="Element10">
Only <strong>declared table token</strong> will be listed in TCustomSqlStatement.TableTokens.&nbsp;</p>
<p class="Element10">
referenced table token, declared table alias token and referenced table alias token can be found in RelatedToken/RelatedTokens property of declared table token.&nbsp;</p>
<p class="Element10">
&nbsp;</p>
<p class="Element10">
Temp table, table variable and declare CTE table will also be listed in TCustomSqlStatement.TableTokens. Use DBObjType property of <a href="TSourceToken.html" target="topic">TSourceToken</a> to find out those tokens.&nbsp;</p>
<p class="Element10">
&nbsp;</p>
<p class="Element10">
Following properties in <a href="TSourceToken.html" target="topic">TSourceToken Class</a> had different meanings according to what's kind of table type this token is.&nbsp;</p>
<p class="Element10">
&nbsp;</p>
<p class="Element10">
===&nbsp;</p>
<p class="Element10">
If table token is a declared table token, then&nbsp;</p>
<p class="Element10">
&nbsp;</p>
<p class="Element10">
ParentToken: schema token if any&nbsp;</p>
<p class="Element10">
ChildToken is null,&nbsp;</p>
<p class="Element10">
RelatedToken: table alias of this declared table token.&nbsp;</p>
<p class="Element10">
RelatedTokens: referenced token of this declared table, or&nbsp;</p>
<p class="Element10">
columns attached to this declared table in-directly. (such as field in <a href="TCustomSqlStatement_Create@TDbVendor.html" target="topic">create</a> table)&nbsp;</p>
<p class="Element10">
RelatedSubquery is null.&nbsp;</p>
<p class="Element10">
&nbsp;</p>
<p class="Element10">
===&nbsp;</p>
<p class="Element10">
If table token is a referenced table token:&nbsp;</p>
<p class="Element10">
&nbsp;</p>
<p class="Element10">
ParentToken: schema token if any.&nbsp;</p>
<p class="Element10">
ChildToken: column attached to this referenced table token.&nbsp;</p>
<p class="Element10">
&nbsp;</p>
<p class="Element10">
===&nbsp;</p>
<p class="Element10">
If table token is a declared table alias token:&nbsp;</p>
<p class="Element10">
&nbsp;</p>
<p class="Element10">
RelatedTokens: referenced tokens of this declared table alias.&nbsp;</p>
<p class="Element10">
RelatedSubquery, subquery if this table alias is linked to a subquery in from clause.&nbsp;</p>
<p class="Element10">
&nbsp;</p>
<p class="Element10">
===&nbsp;</p>
<p class="Element10">
If table token is a referenced table alias token:&nbsp;</p>
<p class="Element10">
ChildToken: column attached to this referenced table alias token.&nbsp;</p>
<p class="Element10">
&nbsp;</p>
<p class="Element10">
===&nbsp;</p>
<p class="Element10">
If table token is a temp table token:&nbsp;</p>
<p class="Element10">
&nbsp;</p>
<p class="Element10">
RelatedTokens, column attached to this table.&nbsp;</p>
<p class="Element10">
&nbsp;</p>
<p class="Element10">
===&nbsp;</p>
<p class="Element10">
If it's a table variable token:(DBObjType = ttobjtableTemp)&nbsp;</p>
<p class="Element10">
RelatedTokens, columns attach to this table.&nbsp;</p>
<p class="Element10">
&nbsp;</p>
<p class="Element10">
====&nbsp;</p>
<p class="Element10">
If it's a declared CTE table token:(DBObjType = ttobjtablecte)&nbsp;</p>
<p class="Element10">
RelatedTokens: referenced table of this <a href="TCustomSqlStatement_cte.html" target="topic">cte</a> table.&nbsp;</p>
<p class="Element10">
fields attach to this <a href="TCustomSqlStatement_cte.html" target="topic">cte</a> table.&nbsp;</p>
<p class="Element10">
&nbsp;</p>
<p class="Element10">
====&nbsp;</p>
<p class="Element10">
If it's a referenced CTE table token:&nbsp;</p>
<p class="Element10">
RelatedToken, alias of this refenced <a href="TCustomSqlStatement_cte.html" target="topic">cte</a> table.&nbsp;</p>
<p class="Element10">
RelatedTokens: columns attached to this referened <a href="TCustomSqlStatement_cte.html" target="topic">cte</a> table&nbsp;</p>
<p class="Element10">
&nbsp;</p>
<p class="Element10">
===&nbsp;</p>
<p class="Element10">
If it's an alias of referenced <a href="TCustomSqlStatement_cte.html" target="topic">cte</a> table token:&nbsp;</p>
<p class="Element10">
RelatedTokens: columns attach to this ref <a href="TCustomSqlStatement_cte.html" target="topic">cte</a> table</p></div>
</div>
<a name="See_Also"></a><div class="Element14">
See Also</div>
<div class="Element11">
<div class="Element10">
<p class="Element10">
<a href="How_to_identify_DB_objects_in_your_sql.html" target="topic">How to identify DB objects in your sql</a></p></div>
</div>
</div>
<!-- End Page Content -->

<!-- Begin Page Footer -->
<div class="Element93">
<table width="100%" cellspacing="0" cellpadding="0">
<tr><td width="100%">
<div class="Element3">
Gudu software http://www.sqlparser.com</div>
</td></tr><tr><td width="100%">
<div class="Element97">
Send <a href="#" onclick="sendFeedback('info@sqlparser.com', 'Documentation Feedback', 'Project: General SQL Parser Help file%0ATopic ID: TCustomSqlStatement.TableTokens%0ATitle: TCustomSqlStatement.TableTokens Property');">comments</a> about this topic.</div>
</td></tr></table></div>

<!-- End Page Footer -->
</div>
</div>

<!-- End Client Area -->
</body></html>